#ifndef SENSOR_H
#define SENSOR_H

#include <vector>
#include <queue>

using namespace std;

struct packet
{
    int id;
    int originSens;
    int timeInQueue;
    int totalTime;
};

class sensor
{
    protected:
        int id;
        int dataRate;
        int sink;
        float battery;
        float x, y;
        double maxRange;
        double range;

    public:
        sensor(int ID, int datRate, float maxb, double maxr, float xpos, float ypos, int src);
        queue<packet> sensorQueue;
        vector<sensor*> neighbor;
        vector< vector<int> > fTable;

        int getId() {return id;};
        int getDataRate() {return dataRate;};
        int getSink() {return sink;};
        void setId(int a) {id = a;};
        void setDataRate(int a) {dataRate = a;};
        //source value of 1 means that the node is a source node
        void setSink(int a) {sink = a;};
        float getx() {return x;};
        float gety() {return y;};

        // function to find neighbor sensor
        void getNeighbor(vector<sensor> &s);

        // function to find distance
        double distance(double x1, double y1);
};

#endif
